<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@page import="com.tss.util.*"%>
<%@page import="com.jedi.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@page import ="java.sql.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
UserMgr userMgr = new UserMgr();
int comid   = ParamUtils.getIntParameter(request,"comid",0);
String area_id       = ParamUtils.getParameter(request,"area_id","");
String engineerid       = ParamUtils.getParameter(request,"engineerid","");
User just_user = (User)session.getAttribute("LoginUser");

String year = ParamUtils.getParameter(request,"year","");

String month = ParamUtils.getParameter(request,"month","");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'task_search.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link href="style/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/common.js"></script>
<script language="javascript">

function chk_submit() {
	var oForm = document.operatorForm;
	
	oForm.action = "analysis_mgt/analysis_list.jsp";
	return true;
}
</script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td >
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       
        <tr> 
          <td height="100" align="center" valign="top" style="padding-top:20px;padding-bottom:10px;">
          <form name="operatorForm" method="post" onsubmit="return chk_submit();">
            <table width="80%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
              
               <tr>
                <td height="24" align="right" bgcolor="#858585">
                
                
                  <font
                  color="#FFFFFF">厂商名称：</font>
                </td>
                <td bgcolor="#EDEDF0">
                 <select  name="comid" style="display:inline"  >
				  <option value="0">==全部==</option>
                    <%
                  CompanyMgr comMgr = new CompanyMgr();
                 List   list =comMgr.getCompanys();
                    if (list != null && list.size() > 0) {
                    	for(int i=0;i<list.size();i++) {
                    		Company item = (Company)list.get(i);
                    %>
                    <option value="<%=item.getComid()%>" <%if (item.getComid()==comid) {%> selected<%}%>><%=item.getComnam()%></option>
                    <%
                    }
                    }
                    %>
 
			</select>
	
                </td>
              </tr>
               <tr>
                <td height="24" align="right" bgcolor="#858585">
                  <font
                  color="#FFFFFF">项目名称：</font>
                </td>
                <td bgcolor="#EDEDF0">
                  <input type="text" name="prjname" size="30" maxlength="50" class="inputBox">
                </td>
              </tr>
               <tr>
                <td height="24" align="right" bgcolor="#858585">
                  <font
                  color="#FFFFFF">工程师姓名：</font>
                </td>
                <td bgcolor="#EDEDF0">
                 <select name="engineer" >
            	        <option value="">全部</option>
            	        <%
            	    	String engineer="engineer";
            	        List userList = userMgr.getUsersGroupbyroleid(engineer);
            	        if (userList != null && userList.size() > 0) {
                    		for(int i=0;i<userList.size();i++){
                    			User item = (User)userList.get(i);
                    	%>
                        <option value="<%=item.getId()%>"<%if (item.getId().equals(engineerid)) {%> selected<%}%>><%=item.getUserName()%></option>
                    	<%}}%>
            	      </select>
                </td>
              </tr>
               
           
             <tr>
                 <td height="24" align="right" bgcolor="#858585"><font
                  color="#FFFFFF">核算日期：</font></td>
                <td bgcolor="#EDEDF0" class="black">
                 			 
          
		 <select name="year">
		  <option value="" <%if (year.trim().equals("")){%> selected<%}%>>全部</option>
                    <%
                    int yearNum = Calendar.getInstance().get(Calendar.YEAR)+5;
                    for(int i= yearNum - 6;i <= yearNum;i++) {
                    %>
                    <option value="<%=i%>"<%if (year.trim().equals(i+"")){%> selected<%}%>><%=i%></option>
                    <%}%>
                  </select> 年 &nbsp; 
                  <select name="month">
                  <option value="" <%if (month.trim().equals("")){%> selected<%}%>>全部</option>
                    <option value="01"<%if (month.trim().equals("01")){%> selected<%}%>>一月</option>
                    <option value="02"<%if (month.trim().equals("02")){%> selected<%}%>>二月</option>
                    <option value="03"<%if (month.trim().equals("03")){%> selected<%}%>>三月</option>
                    <option value="04"<%if (month.trim().equals("04")){%> selected<%}%>>四月</option>
                    <option value="05"<%if (month.trim().equals("05")){%> selected<%}%>>五月</option>
                    <option value="06"<%if (month.trim().equals("06")){%> selected<%}%>>六月</option>
                    <option value="07"<%if (month.trim().equals("07")){%> selected<%}%>>七月</option>
                    <option value="08"<%if (month.trim().equals("08")){%> selected<%}%>>八月</option>
                    <option value="09"<%if (month.trim().equals("09")){%> selected<%}%>>九月</option>
                    <option value="10"<%if (month.trim().equals("10")){%> selected<%}%>>十月</option>
                    <option value="11"<%if (month.trim().equals("11")){%> selected<%}%>>十一月</option>
                    <option value="12"<%if (month.trim().equals("12")){%> selected<%}%>>十二月</option>
                  </select>
                </td>
              </tr>
             
           
              <tr> 
                <td height="24" align="right" bgcolor="#EDEDF0">&nbsp;</td>
                <td bgcolor="#EDEDF0"> 
                  <input type="submit" name="submit" value="搜 索" class="inputButton"> 
                  <input type="reset" name="reset" value="重 写" class="inputButton"> 
                  <input type="hidden" name="cmd" value=""> 
                </td>
              </tr>
           
            </table>
               </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<iframe width="168" height="190" name="gToday:normal:agenda.js" id="gToday:normal:agenda.js"
			src="calendar/ipopeng.htm" scrolling="no" frameborder="0" style="BORDER-RIGHT:2px ridge; BORDER-TOP:2px ridge; Z-INDEX:999; LEFT:-500px; VISIBILITY:visible; BORDER-LEFT:2px ridge; BORDER-BOTTOM:2px ridge; POSITION:absolute; TOP:0px">
		</iframe>
</body>
</html>